package com.ideaaedi.extspringcache.properties;

import com.ideaaedi.extspringcache.properties.nested.ExtCaffeineProperties;
import com.ideaaedi.extspringcache.properties.nested.ExtRedisCaffeineProperties;
import com.ideaaedi.extspringcache.properties.nested.ExtRedisProperties;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

/**
 * (non-javadoc)
 *
 * @author <font size = "20" color = "#3CAA3C"><a href="https://gitee.com/JustryDeng">JustryDeng</a></font> <img
 * src="https://gitee.com/JustryDeng/shared-files/raw/master/JustryDeng/avatar.jpg" />
 * @since 1.0.0
 */
@Data
@ConfigurationProperties("ext.spring.cache")
public class ExtSpringCacheProperties {
    
    /**
     * 是否打印banner
     */
    private boolean printBanner = true;
    
    /**
     * 当没有ext管理器可以被总管理器ExtCacheManager管理时，管理器ExtCacheManager是否管理默认的CacheManager
     */
    private boolean useDefaultCacheManagerIfMiss = true;
    
    /**
     * redis缓存配置
     */
    @NestedConfigurationProperty
    private ExtRedisProperties redis = new ExtRedisProperties();
    
    /**
     * caffeine缓存配置
     */
    @NestedConfigurationProperty
    private ExtCaffeineProperties caffeine = new ExtCaffeineProperties();
    
    /**
     * redis & caffeine 缓存配置
     */
    @NestedConfigurationProperty
    private ExtRedisCaffeineProperties redisCaffeine = new ExtRedisCaffeineProperties();
}
